package com.yoosora.utils;

import com.google.common.collect.Lists;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class YoosoraUtils {
	public static List<Object> generateForwardMsg(long uin, String name, List<String> msgList) {
		List<Object> nodeList = Lists.newArrayList();
		msgList.stream().forEach(o -> {
			Map<String, Object> node = new HashMap(2);
			Map<String,Object> data = new HashMap<>(3);
			node.put("type", "node");
			node.put("data", data);
			data.put("name", name);
			data.put("uin", uin);
			data.put("content", o);
			nodeList.add(node);
		});		
		return nodeList;
	}
	
	
}
